class Animal{
    String name;
    String color;

    public Animal(String name,String color){
        this.name = name;
        this.color = color;
    }

    public void eat(){
        System.out.println(name + "吃东西");
    }
}

class Dog extends Animal {
    public Dog(String name,String color){
        super(name,color);
    }
}

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("wangcai","baise");
        dog.eat();
    }
}